package org.timeismoney.payment.dao.impl;

import org.timeismoney.payment.dao.ItemStuDetailDao;
import org.timeismoney.payment.model.ItemStuDetail;

public class ItemStuDetailDaoImpl extends
		GenericDaoImpl<ItemStuDetail, Integer> implements ItemStuDetailDao {

	public ItemStuDetailDaoImpl() {
		super();
		setClazz(ItemStuDetail.class);
	}

	public void deleteByStuNo(String stuNo) {
		getHibernateTemplate().bulkUpdate(
				"delete from ItemStuDetail where student.stuNo = ?", stuNo);
	}

	public void deleteAllBySchoolYearNo(Integer schoolYearNo) {
		getHibernateTemplate().bulkUpdate(
				"delete from ItemPaymentDetail where schoolYear.schoolYearNo=?", schoolYearNo);
	}

	public void deleteAllByItemNo(Integer itemNo) {
		getHibernateTemplate().bulkUpdate(
				"delete from ItemPaymentDetail where item.itemNo=?", itemNo);
	}

}
